<?php

	require_once('class.phpmailer.php');

	$mail = new PHPMailer();
	$mail->CharSet = "utf-8";
	$mail->IsHTML(true);
	$mail->IsSMTP();
	$mail->SMTPAuth = true; 
	$mail->SMTPSecure = ""; 
	$mail->Host = "192.168.10.180"; 
	$mail->Port = 25; 
	$mail->Username = "auttavut@admail.local"; 
	$mail->Password = "adinop1*"; 
	$mail->From = "auttavut@admail.local";
	//$mail->AddReplyTo = "support@thaicreate.com"; // Reply
	$mail->FromName = "Poarkung";  
	$mail->Subject = "ทดสอบ Test sending mail eiei 55."; 
	$mail->Body = "ข้อความต่อไปนี้เป็น....การทดสอบระบบส่ง Mail (IT)";
	
	$mail->AddAddress("auttavut@admail.local", "Mr.Auttavut");
	//$mail->AddAddress("suchart@admail.local", "Mr.Suchart"); 
	$mail->AddAttachment("pic/iphone_5.jpg");
	$mail->AddAttachment("pic/case_ipad.jpg");
	$mail->AddAttachment("pic/Image.jpg");
	
	//$mail->AddCC("payao@admail.local", "P' Yao");
	//$mail->AddCC("pannida@admail.local", "P' Pound");
	//$mail->AddCC("suchart@admail.local", "P' Chart");
	
	//$mail->set('X-Priority', '1'); //Priority 1 = High, 3 = Normal, 5 = low

	if(!$mail->Send()) {
    echo "Mailer Error: " . $mail->ErrorInfo;
	} else {
		echo "Message sent!";
	} 
?>
